import request from '@/utils/request'

export default {
  // 1.获取章节信息
  getChapterVideo(courseId) {
    return request({
      url: `/eduservice/chapter/getChapterVideo/${courseId}`,
      method: 'get'
    });
  },
  addChapter(chapterInfo) {
    return request({
      url: `/eduservice/chapter/addChapter`,
      method: 'post',
      data: chapterInfo
    });
  },
  updateChapter(chapterInfo) {
    return request({
      url: `/eduservice/chapter/updateChapter`,
      method: 'post',
      data: chapterInfo
    });
  },
  getChapterInfo(chapterId) {
    return request({
      url: `/eduservice/chapter/getChapterInfo/${chapterId}`,
      method: 'get'
    });
  },
  deleteChapter(chapterId) {
    return request({
      url: `/eduservice/chapter/${chapterId}`,
      method: 'delete'
    });
  }
}
